<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <title></title>
    <!--<script src="/assets/js/jquery-3.2.1.js"></script>-->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
          integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU"
          crossorigin="anonymous">
</head>

<style>
    body {

    }

    .titles {
        width: 100%;
        height: 50px;
        background-color: #F5F7F9;
        box-sizing: border-box;
    }

    .title-1 span {
        width: 5px;
        height: 25px;
        display: inline-block;
        background: #5AA2FD;
        position: absolute;
        top: 10px;
    }

    .title-1 div {
        display: inline-block;
        font-family: 宋体;
        font-size: 21px;
        margin-left: 10px;

    }

    .title-1 {
        max-width: 120px;
        height: 50px;
        border: 1px solid rgba(0, 0, 0, 0.0);
        line-height: 50px;
        position: relative;
    }

    .box-head {
        margin: 15px 0px;
    }

    .panel-heading {
        min-height: 80px;
    }

    .page-table-header {
        padding-left: 10px;
        margin-bottom: 15px;
    }

    .panel {
        min-width: 1000px;
    }
</style>
<body>
<div class="titles">
    <div class="title-1">
        <span></span>
        <div>商品列表</div>
    </div>

</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <div class="box-head">

            <form action="" method="get" class="form-inline form-search" role="form">
                <div class="form-group">
                         <span class="pull-left">
                                   <a class="btn btn-sm btn-primary" href="#"><i class="fa fa-plus"></i> 添加
商品</a>
                                   <a class="btn btn-sm btn-primary" href="https:#"><i
                                           class="fa fa-plus"></i> 快速添加商品</a>

                                  <a class="btn btn-sm btn-primary" href=""><i class="fa fa-plus"></i> 导入商
品</a>
						</span>
                </div>


                <div class="form-group pull-right">
                    <div class="input-group">
                        <input style="height: 31px" type="text" class="input-sm form-control" name="keyword"
                               value=""
                               placeholder="ID/名称/编号/条码/商户名称">
                        <div class="input-group-btn">
                            <button class="btn btn-primary" type="submit"> 搜索</button>
                        </div>


                    </div>

                </div>


                <div class="form-group pull-right">
                    <select name="cate" class="form-control select2" style="width: 200px; " data-
                            placeholder="商品分类"
                            tabindex="-1" title="">
                        <option value="" selected="">商品分类</option>
                        <option value="5">瑞士</option>
                        <option value="13">瑞士-欧米茄</option>
                        <option value="15">瑞士-浪琴</option>
                        <option value="206">瑞士-天梭</option>
                        <option value="204">瑞士-MIDO</option>
                        <option value="19">瑞士-天珺</option>
                        <option value="201">瑞士-SEVENFRIDAY</option>
                        <option value="210">瑞士-依波路</option>
                        <option value="7">中国</option>
                        <option value="20">中国-飞亚达</option>
                        <option value="21">中国-欧力派</option>
                        <option value="199">中国-天霸</option>
                        <option value="200">中国-雷迈</option>
                        <option value="208">中国-格雅</option>
                        <option value="9">欧美</option>
                        <option value="198">欧美-D W</option>
                        <option value="24">欧美-C K</option>
                        <option value="196">欧美-MARVEL</option>
                        <option value="197">欧美-阿玛尼</option>
                        <option value="8">日本</option>
                        <option value="207">日本-卡西欧</option>
                        <option value="3">二手优品</option>
                        <option value="202">二手优品-官方直营</option>
                        <option value="203">二手优品-官方寄售</option>
                    </select>
                </div>


                <div class="form-group pull-right">
                    <div class="input-group-select">

                        <select class="form-control" style="width: 200px;">

                            <option value="" selected="">商品属性</option>
                            <option value="new">新品</option>
                            <option value="hot">热卖</option>
                            <option value="recommand">推荐</option>
                            <option value="discount">促销</option>
                            <option value="sendfree">包邮</option>
                            <option value="time">限时卖</option>
                            <option value="nodiscount">不参与折扣</option>
                        </select>
                    </div>


                </div>


            </form>


        </div>
    </div>
    <div class="panel-body">

        <div class="page-table-header">
            <input type="checkbox" id="checkboxs" style="margin-right: 15px">
            <div class="btn-group">
                <button class="btn btn-default btn-sm  btn-operation" type="button" data-toggle="batch"
                        data-href="https://houtai.hcywatch.com/web/index.php?
c=site&amp;a=entry&amp;m=ewei_shopv2&amp;do=web&amp;r=goods.status&amp;status=0"
                        disabled="disabled">
                    <i class="icow icow-xiajia3"></i> 下架
                </button>
                <button class="btn btn-default btn-sm  btn-operation" type="button" data-toggle="batch-
remove"
                        data-confirm="确认要删除吗?"
                        data-href="https://houtai.hcywatch.com/web/index.php?
c=site&amp;a=entry&amp;m=ewei_shopv2&amp;do=web&amp;r=goods.delete"
                        disabled="disabled">
                    <i class="icow icow-shanchu1"></i> 删除
                </button>


                <button class="btn btn-default btn-sm  btn-operation" type="button" data-toggle="batch-group"
                        id="batchcatesbut" disabled="disabled">批量分类
                </button>
            </div>
        </div>

        <table border="0" cellspacing="0" cellpadding="0" class="table table-hover table-striped table-
responsive">
            <tr>
                <th></th>
                <th>排序</th>
                <th>商品</th>
                <th>价格</th>
                <th>库存</th>
                <th>销量</th>
                <th>实际销量</th>
                <th>状态</th>
                <th>属性</th>

                <th>操作</th>
            </tr>
            {volist name='list' id='goods'}
            <tr>
                <td><input type="checkbox" name="" id="" class="check" value="{$goods.id}"/></td>
                <td>{$goods.sort}</td>
                <td>{$goods.name}</td>
                <td>{$goods.selling_price}</td>
                <td>{$goods.inventory}</td>
                <td>{$goods.sale_quantity}</td>
                <td>{$goods.ac_sale_quantity}</td>
                <td><span class="badge" style="background-color: #337AB7;">{$goods.status}</span></td>
                <td>

                    {$goods.attribute}

                </td>

                <td>
                    <a>
                        <span class="btn btn-default btn-sm">
                             <i class="far fa-edit"></i>
                             <div>编辑</div>
                        </span>


                    </a>
                    <a>
                        <span class="btn btn-default btn-sm">
                            <i class="fas fa-trash"></i>
                             <div>删除</div>
                        </span>
                    </a>
                    <a>
                        <span class="btn btn-default btn-sm">
                             <i class="fas fa-link"></i>
                             <div>链接</div>
                        </span>
                    </a>
                    <a class="">
                        <span class="btn btn-default btn-sm popovers " data-toggle="popover" data-
                              trigger="click|hover"
                              data-placement="auto right" data-html="true"
                              data-content="<img src='/assets/images/二维码.png' width='130' alt='链接二维
码'>">
                             <i class="fa fa-qrcode"></i>
                             <div>二维码</div>

                        </span>
                    </a>


                </td>

            </tr>
            {/volist}
        </table>
        {$list->render()}
    </div>
</div>

<?php
 echo '<pre/>';
 var_dump($list);

?>

<script>
    $(function () {
        $(".popovers").hover(function () {
            $(this).popover('show');
        }, function () {
            $(this).popover('hide');
        });

        $("#checkboxs").click(function () {
            var checked = $(this).prop("checked");
            $(".check").prop("checked", checked);
        })
        $(".check").click(function () {
            var len = $(".check").length;
            if ($(".check:checked").length == len) {
                $("#checkboxs").prop("checked", "checked");
            } else {
                $("#checkboxs").prop("checked", false);
            }


        })



        var obj =eval('<?php echo json_encode($list);?>');

                alert(obj[0]);
                alert(obj[1]);
                alert(obj[2]);



    });

</script>
</body>
</html>